From b82aa4bbee0a31cd04966e049e38666578711eb7 Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Wed, 16 Aug 2006 15:58:28 +0000 Subject: [PATCH] take the cell spacing into account when calculating the available extra 2006-08-16 Kristian Rietveld * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action): take the cell spacing into account when calculating the available extra space. (#350938, patch from Peter Johanson). --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ gtk/gtktreeviewcolumn.c | 7 ++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 273edbf098..6b2a11f386 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-08-16 Kristian Rietveld + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action): + take the cell spacing into account when calculating the available + extra space. (#350938, patch from Peter Johanson). + 2006-08-16 Kristian Rietveld * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_fetch_child): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 273edbf098..6b2a11f386 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2006-08-16 Kristian Rietveld + + * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_cell_process_action): + take the cell spacing into account when calculating the available + extra space. (#350938, patch from Peter Johanson). + 2006-08-16 Kristian Rietveld * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_fetch_child): diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index b5e657e0aa..3ee3fcc475 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -2631,6 +2631,7 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column, gint special_cells; gint horizontal_separator; gboolean cursor_row = FALSE; + gboolean first_cell = TRUE; gboolean rtl; /* If we have rtl text, we need to transform our areas */ GdkRectangle rtl_cell_area; @@ -2699,7 +2700,11 @@ gtk_tree_view_column_cell_process_action (GtkTreeViewColumn *tree_column, if (info->expand == TRUE) expand_cell_count ++; full_requested_width += info->requested_width; - /* FIXME: We prolly need to include tree_column->spacing here */ + + if (!first_cell) + full_requested_width += tree_column->spacing; + + first_cell = FALSE; } extra_space = cell_area->width - full_requested_width; -- 2.30.2